<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app"></div>
    <script src="./vue.js"></script>
    <script>
        let vm = new Vue({
            el:'#app',
            render(createElement){
                // createElement()  接收三个数据类型:string function object
                // console.log(createElement('div','123'));
                // let el = createElement({
                //     template:'<span>span</span>'
                // });
                let fun = () => {
                    return {
                        template:'<div>123</div>'
                    }
                }
                let el = createElement(fun())
                return createElement('div', [//由createElement函数构建而成的数组
                    createElement('h1', '主标'),//createElement函数返回VNode对象
                    createElement('h2', '副标')
                ]);
            }
        })

        
    </script>
</body>
</html>